Methods
Study site and subjects
The experiment was done in June and July 2017 at La Selva Biological Field Station, Province Heredia, Costa Rica. Male and female individuals of the species Glossophaga commissarisi, were captured from the wild for the experiment. The bats were attracted to a particular location in the forest using sugar-water (see Reward below) as bait and then caught in mist-nets. The bats were sexed and the selected individuals were were then taken to another location in the rainforest where two flight-cages (4 x 6 m) were set up. The flight-cages had mesh walls and therefore the same climactic conditions as the surrounding environment. A group of four bats at a time were put into a flight cage. All the individuals in a group were the same sex. The bats were weighed and radio frequency identification (RFID) tags that were uniquely assigned to each bat were placed around their necks as collars. The bats were then released into the flight-cages so they could fly within them freely.
Before the start of the experiment the procedure was tested with four females and refinements were made to the procedure. The data from these individuals were not analyzed. 16 bats participated in the main experiment. At the end of the experiment, the RFID collars were removed and the bats were weighed to make sure they had not lost too much weight. No blinding was done as all the data collection was completely automatized. Two of the bats did not drink sufficient nectar and were released before the end of the experiment and not replaced. The data from these two individuals were not analyzed. Thus, 14 bats in total (7 males and 7 females) completed the experiment and the data from these animals were analyzed.
Animal experimental procedures were reviewed and permission for animal experimentation and RFID-tagging was granted by Sistema Nacional de Areas de Conservación (SINAC) at the Ministerio de Ambiente y Energía (MINAE), Costa Rica.
Experimental Setup
Reward
The reward received by the bats during the experiment was also their main source of food. The reward was a 17% by weight solution of sugar dissolved in water (prepared fresh everyday), hereafter referred to as ‘nectar.’ The sugar consisted of a 1:1:1 mass-mixture of sucrose, fructose and dextrose. The nectar was thus similar in composition and concentration to the nectar produced by wild chiropterophilous plants (Baker, Baker, and Hodges 1998).
Flower and pump setup
Each flight cage had a square plastic frame in the center (2x2x1.5m). Eight reward-dispensing devices - hereafter referred to as ‘flowers’ - were fixed in a radial pattern on this frame, two on each side of the square (see Figure 1) with a minimum distance of 40 cm between adjacent flowers. This is a distance the bats can discriminate (Thiele and Winter 2005). Each flower had the following parts: an RFID reader mounted on a plastic cylinder around the head of the flower; an infra-red light-barrier beam; an electronic pinch valve through which a PVC tube was placed and fixed to the head of the flower
A single stepper-motor pump was placed in the center of the plastic frame. The pump contained a 25 mL Hamilton glass syringe (Sigma Aldrich) which was connected to the tubing system of the flowers through 5 pinch valves. These pinch valves controlled the flow of liquid from the pump to the system and from a reservoir of liquid to the pump. This reservoir (500 mL thread bottle, Roth, Germany) was filled with fresh nectar everyday and connected to the syringe through the valves. The nectar was then pushed by the syringe through the valves into the tubes.
When an RFID-tagged bat approached a flower, the individual RFID number was read by the reader. If the bat then poked its nose into the flower and broke the light barrier, it triggered the release of a reward. The pinch valve opened and the pump moved the correct number of pre-programmed steps to dispense nectar to the head of the flower. The bat could easily hover in front of the flower and lick this up. Only when both events occurred, i.e., the RFID reader detected a bat and the light-barrier was broken, would a reward be triggered.
The flowers and the pump were connected to a Lenovo ThinkPad laptop computer, which ran the experimental programs and the programs used to clean and fill the systems: PhenoSoft Control 16, PhenoSoft GmBH, Berlin, Germany. The raw data were also recorded to this computer as comma-separated values (CSV) files.
Experimental procedure
Every day at around 1000 h the old nectar was emptied from the system. The system was rinsed and filled with plain water until 1500 h , when it was filled again with fresh nectar. Twice a week the system was filled with 70% ethanol for an hour to prevent microbial growth, then repeatedly rinsed with water.
4 bats were placed in a flight-cage in a group, and all the bats were the same sex. There were 4 such groups in total, and data were collected simultaneously from two groups, one in each flight-cage. Each bat was uniquely assigned 2 adjacent flowers on the same side of the square frame, out of the array of eight. These flowers were programmed to reward only 1 of the 4 bats in the cage. After the system was filled with fresh nectar at approximately 1700 h, the program was left running till the next morning for data-collection. Thus, the bats could begin visiting the flowers to collect a reward whenever they chose, which was at approximately 1800 h every night.
During the course of the night, when the syringe of the pump had been emptied, the pump re-filled automatically. This process took 3.75 minutes (SD = ±2.23) in Cage 1, occurring on average 4.2 times (SD = ± 2.28); and 2.31 minutes (SD = ±0.93) in Cage 2, occurring on average 5.4 times (SD ± 3.58). About 1 % (SD = ±0.74) of all visits made by the bats over all 3 experimental nights happened during the pump refill events, and the bats did not receive any reward on these visits, even if they were made to the rewarding flower.
Every night the bats were also given ad-libitum supplemental food: 3.5g of hummingbird food (NektarPlus, Nekton) in 100 mL of water and 3.5g of milk powder (Nido 1+, Nestle) in 100 mL of water. They were also given a small bowl of locally-sourced bee pollen.
Experimental design
The experiment proceeded through the following stages.
Ad-libitum reward
On the night the naive bats were captured and placed into the flight cages they received ad-libitum reward from all the flowers all night long. To enable the bats to find the flowers a small cotton pad was placed on the flowers, soaked with di-methyl di-sulphide. This is a chemical attractant produced by many bat-pollinated flowers (Helversen, Winkler, and Bestmann 2000). A small drop of honey was applied to the inside of the flowers to encourage the bats to place their heads inside, break the light-barrier and trigger a nectar reward. By the end of the night all the bats had found the flowers and learned to trigger rewards quickly.
Flower training
After the bats had learned to trigger rewards, the next stage of training involved assigning the bats uniquely to two out of the eight flowers in the array. This stage was similar to the ad-libitum stage, except the bats could only trigger a reward at their assigned flowers.
Alternation
To ensure that the bats were familiar with both flowers assigned to them they went through one final stage of training: forced alternation between the two assigned flowers all night long.
Main Experiment
In this serial reversal learning task the bats had to choose between a flower that gave 40 \(\mu\)L of nectar and one that gave no reward at all. The location of the rewarding flower was not cued, but through the Alternation phase of training each bat knew the locations of both flowers that were potentially rewarding to it. After a bat had made 50 visits in total to the two flowers a reversal occurred: the previously rewarding flower became the non-rewarding flower and vice versa. The batch of 50 visits that occurred between two consecutive reversals (when the locations of the rewarding and unrewarding flowers) was termed a ‘reversal block,’ including the first 50 visits of a night when the bats had not experienced any reversal at all that night. This occurred at regular intervals of 50 visits until the bat either stopped making visits or reached a maximum of 300 visits in a night. After the bat had made 300 rewarded visits it could no longer receive a reward that experimental night. There were five reversals per night. This stage of the experiment was repeated for three nights in a row. The same flower was the first to be rewarding at the start of every night. Thus, because there were five reversals every night (so six blocks of 50 visits), the last flower to be rewarding on a night was non-rewarding at the start of the next night.
Statistical analysis
All the visits made by the bats during a night, up to a maximum of 300 were included in the analyses. There were 3 experimental nights, divided into six blocks of 50 visits each. At the end of the first five blocks a reversal occurred and the end of the last block was the end of data-collection for the night. Each block was further divided into five bins, each consisting of 10 visits, in order to further examine the bats’ behaviour within each block.
We defined a perseverative visit as a visit to the previously-rewarding option just after the occurrence of a reversal, until the first visit to the newly-rewarding option. By definition this could not happen in the first block of a night. A generalized linear mixed-model was used to investigate the effect of experimental night and reversal block on the number of perseverative visits. This model was fit in a Bayesian framework using Hamiltonian Monte Carlo in the R package brms (Bürkner 2017), which is a front-end for rstan (Stan Development Team, 2020). A negative-binomial likelihood function was used for this model. Experimental night, reversal block and their interaction were fixed effects and random slopes and intercepts were used to fit regression lines for each individual animal. We also examined the proportion of visits made to the rewarding flower. This was defined as ratio of the number of visits to the rewarding flower divided by the total number of visits in a bin. The model was fit using a binomial likelihood function, with experimental night, block, bin and their interactions as fixed effects; random slopes and intercepts were used to fit regression lines for the individuals. After examining the results of the above analyses, further data exploration was done. We defined a sampling visit as a visit made to a non-rewarding flower after the first experience of reward at a rewarding flower in any block. A negative-binomial likelihood function was used to model the number of sampling visits made by the bats, with experimental night, reversal block, bin and their interactions as fixed effects. Random slopes and random intercepts were used to fit regression lines for the individual animals. A second model was also fit to the proportion of visits to the rewarding flower to take into account the fact that the first night and the first block of each night were qualitatively different from the others. On the first night the animals had had no prior experience of any reversals, and during the first block of every night they had not experienced any reversals on that night, and this was reflected in the fit of the posterior predictions made from the first model. The second model of these data was identical to the first except for the addition of experimental night and block as factor variables, with the first night and the first block of every night as one level and the other nights and other blocks of each night as the other level. The two models were compared using leave-one-out cross-validation, implemented in brms using the package loo (Vehtari, Gelman, and Gabry 2017).
Weakly informative priors were used. The random intercepts and slopes were given a Normal distribution with a mean of 0, and a standard deviation drawn from a Cauchy distribution with a mean of 0 and a standard deviation of 1. All the models were estimated using 4 chains with a thinning interval of 3, with 1200 warm-up samples and 1300 post-warm-up samples for the model with the first experimental night and block additionally treated differently; 2000 warm-up samples and 2000 post-warm-up samples for the model of the smapling visits; and 1000 warm-up samples and 1000 post-warm-up samples for the others.
Visual inspection of the trace plots, the number of effective samples, the Gelman-Rubin convergence diagnostic (\(\hat R\)) and the calculation of posterior predictions for the same clusters were all used to assess the fit of the models. In all of the models the \(\hat R\) was equal to 1 for all the chains.
The data from all 14 bats that participated in the three experimental nights were included in these models, even though some individuals did not complete all 300 visits on every single night.
All statistical analyses and creation of plots were done in R.
Data availability
All data and analysis code are available online at …..
Results
Confirmatory Analyses
Explanatory paragraph
This paragraph is just for our guidance and will be removed later: it is an overall summary of the conclusions we draw from all of the analyses, i.e., the story we are building. Confirmatory analyses: As bats experience serial reversals they show a more rapid switch to the rewarding option after a reversal, and an overall increase in the proportion of visits made to the rewarding option. This overall increase was smaller with each successive reversal.
Exploratory analyses: The largest proportion of visits to the rewarding option was made every night before the bats had experienced any reversals. In addition, the smaller increase with each reversal seen in the confirmatory analysis was not due to an increase in sampling visits, but explainable through the combination of a faster switch to the rewarding option and an extremely high proportion of visits to the rewarding option: a sort of ‘ceiling effect.’
a) Bats made more than 90% of their visits to the rewarding option
At the start of the each night, before they had experienced any reversals, the bats made approximately 91% (±SD 7) of their visits to the rewarding flower; immediately following a reversal, this proportion dropped below 50% (Figure 2). The proportion of visits to the rewarding flower for the rest of a block then increased to 93% (±SD 9) after the first bin of 10 visits following a reversal.
b) Bats switch to the rewarding option faster as they experience more reversals
A visit to a non-rewarding flower after a reversal, before the first experience of a reward at the newly-rewarding option was called a perseverative visit. Our analysis showed that both experimental night and block had a negative effect on the number of perseverative visits made by the bats. As the bats experience more reversals on more nights the number of perseverative visits decreased. The interaction of night and block, however, was positive: the decrease in the number of perseverative visits was smaller as the bats experienced more experimental nights.
**Table 1**: Results of the random regression model (brms), testing for the effects of night and block (fixed effects) on the number of perseverative visits (dependent variable)Fixed effect | Estimate | 95% Credibility intervals |
Intercept | 3.04 | (2.5 , 3.51) |
Night | -0.58 | (-0.83 , -0.33) |
Block | -0.27 | (-0.4 , -0.15) |
Night-Block Interaction | 0.10 | (0.04 , 0.16) |
Figure 5 shows the fit of the model to the empirical data through sampling from the posterior distribution. The model clearly captures both the negative effect of night and block, as well as their positive interaction.
c) The bats increase the proportion of visits to the rewarding option as they experience more reversals; this behaviour shows a ‘ceiling effect’
The proportion of visits to the rewarding option was a modeled as an effect of experimental night, block and bin. This analysis showed that night, block and bin all had a positive effect on the proportion of visits to the rewarding option: as the bats experience more reversals on more nights, and the more visits made since the occurrence of a reversal, the proportion of visits made to the rewarding option increased. Interestingly the slopes of the interactions of experimental night and block; block and bin within the block; and experimental night and bin within the block were all negative. That is, the increase in proportion of visits to the rewarding flower gets smaller as the bats experience more reversals on more nights; there is a smaller ‘improvement’ in performance. Though the interactions effects were smaller than the main effects, the 95% credibility intervals of neither the main nor the interaction effects overlapped with 0.
**Table 2**: Results of the random regression model (brms), testing for the effects of night, block and bin on the proportion of visits to the rewarding flower (dependent variable)Fixed effect | Estimate | 95% Credibility intervals |
Intercept | -2.39 | (-3.03 , -1.76) |
Night | 0.89 | (0.66 , 1.12) |
Block | 0.17 | (0.05 , 0.3) |
Bin | 1.50 | (1.28 , 1.74) |
Night-Block interaction | -0.08 | (-0.13 , -0.04) |
Block-Bin interaction | -0.06 | (-0.1 , -0.03) |
Night-Bin interaction | -0.12 | (-0.2 , -0.05) |
Figure 7 shows the fit of the posterior predictions of this model.
Further exploratory analyses
a) The effect of the first experimental night and the first block of each night
The first block of an experimental night was qualitatively different from the other blocks, as this was the only part of the night when the bats had not yet experienced a reversal. A similar argument can be made about the first experimental night: on this night the bats experience reversals for the first time. As it seemed the posterior predictions of our model with the effects of experimental night, block and bin did not completely capture the behaviour of the bats we did an exploratory analysis to specifically explore the effect of the first block and the first night.
The results of the model that accounts for the first night and block are presented in Figure 8. The main effects of night, block and bin, and their interactions were similar to the previous model. Additionally, the variable ‘block type,’ (i.e., whether a block was the first reversal block of the night or not), had a positive slope. The bats made more visits to the rewarding flower before they had experienced any reversal at all. While the ‘night type’ did not seem to affect the proportion of visits to the rewarding flower, block type and night type had an interaction effect with a positive slope coefficient: the first block of the first night, before any reversals had ever been experienced even once, had the highest proportion of visits to the rewarding flower compared to any other block on any other night.
**Table 3**: Results of the random regression model (brms), testing for the effects of night, block, bin, night type and block type on the proportion of visits to the rewarding flower (dependent variable)Fixed effect | Estimate | 95% Credibility intervals |
Intercept | -3.30 | (-4.3 , -2.27) |
Night | 0.94 | (0.57 , 1.33) |
Block | 0.48 | (0.33 , 0.63) |
Night Type 1 | -0.39 | (-0.95 , 0.18) |
Block Type 1 | 1.20 | (0.3 , 2.18) |
Bin | 1.78 | (1.35 , 2.22) |
Night-Block interaction | -0.13 | (-0.19 , -0.08) |
Block-Bin interaction | -0.09 | (-0.13 , -0.04) |
Night-Bin interaction | -0.18 | (-0.34 , -0.03) |
Night Type 1-Block Type 1 interaction | 0.62 | (0.17 , 1.05) |
Block Type 1-Bin interaction | 0.06 | (-0.21 , 0.34) |
Night Type 1-Bin interaction | -0.09 | (-0.35 , 0.16) |
We compared the predictive accuracy of the model that included night type and block type to the model that did not include these, using leave-one-out cross-validation. The LOO criterion was lower for the former than the latter, indicating better predictive accuracy (Table 4).
**Table 4**: Comparison of the two models of the proportion of visits to the rewarding optionModel | Difference in LOO estimates | Standard error |
Model accounting for the first night and first block separately | 0.00 | 0.00 |
Night and block as continuous only | -108.21 | 14.14 |
b) Sampling visits
As the previous analyses have shown, the proportion of visits made to the rewarding option increased overall as the bats experienced more reversals, but this ‘improvement’ in performance decreases. We inferred that this could be for one of the following reasons. It is possible the bats’ behaviour showed a ‘ceiling effect’: as the proportion of visits to the rewarding option is very close to 1, and the number of perseverative visits decreases, the proportion of visits to the rewarding option cannot increase much further. Another possibility is a change in the number of sampling visits. We define a sampling visit as a visit to the non-rewarding flower after the first visit to a rewarding flower in a particular block. If there is an increase in the number of sampling visits as the bats experience more reversals, this too could cause the negative interaction effect of night and block, and block and bin on the proportion of visits to the rewarding option.
Modeling the number of sampling visits made by the bats as an effect of the night, block and bin showed that this was not, in fact, the case. The number of sampling visits does not appear to change as an effect of the increasing number of reversals: the 95% credibility intervals of the slope intercepts overlap with 0, both for the main as well as the interaction terms (Figure 10). In other words, the increase in the proportion of visits to the rewarding option (the ‘improvement’ in performance) does not appear to be affected by sampling visits.